Docular Configurations

The links below illustrate the use of Docular configurations via the grunt-docular.com website. The links will take you through each of configurations listed at the bottom of this page in the example Gruntfile.js file.

Example Gruntfile.js for grunt-docular.com

The example below shows a bare bones Grunt configuration and the most basic configurations for Docular. The only additional content provided is the "docularpartialhome" file used to customize the homepage. The rest of the pages are documentation generated from the Docular and AngularJS source and documentation files.

module.exports = function(grunt) {

    // Project configuration.
    grunt.initConfig({

        pkg: grunt.file.readJSON('package.json'),

        docular: {
            groups: [],
            showDocularDocs: true,
            showAngularDocs: true,
            docular_partial_home: 'home.html',
            analytics: {
                account: 'UA-40646426-1',
                domainName: 'grunt-docular.com'
            },
            discussions: {
                shortName: 'johndavidfive',
                url: 'http://johndavidfive.com',
                dev: false
            }
        }

    });

    // Load the plugin that provides the "docular" tasks.
    grunt.loadNpmTasks('grunt-docular');

    // Default task(s).
    grunt.registerTask('default', ['docular']);

};

Generate the documentation and resources for the webapp

The above Gruntfile.js configuration uses...

grunt.registerTask('default', ['docular']);

...so to generate documenation you could take advantage of the default setting and just run

grunt

You could also target the documentation generation task directly:

grunt docular

Run the local NodeJS server for immediate viewing

grunt docular-server